#include <bits/stdc++.h>
using namespace std;
string s = "etaoinshrdlcumwfgypbvkj";

string decrypt(string miwen, string s)
{
    string mingwen;
    int i, k;
    char c;
    for (i = 0; i < miwen.length(); i++)
    {
        if (miwen[i] >= 'A' && miwen[i] <= 'Z')
            miwen[i] = miwen[i] - 'A' + 'a';
        c = miwen[i];
        for (k = 0; k < s.length(); k++)
        {
            if (c == s[k])
            {
                mingwen += 'a' + k;
                break;
            }
        }
    }
    cout << mingwen << endl;
    return mingwen;
}

int main()
{
    string str = "IRGNYNATSVIRANSLERONNNDNBRNITROLIGHAUSRSNSHXPLIEUTGTOMEFODTHRAIZIHGAKDOHTOZTDDPHEIBFKLOTDUEDOHCRYSNSEWINOFITSYNRESELONESDFNEGNOSHTLYFTKYNOMISRDEYTMIESONDDANKILEOCEHBOACAEOOOMMMETHLRIODMEYMLNENEREAAHFOLFADTEENNPHEOHUALIYEOHIFTANSELODUNURRALSUEGZFUUYANHTOMQLPFAREDCFUFNESESYAMRGAEDCEWPFGOOIATA";
    // getline(cin, str);
    map<char, int> mp;
    for (int i = 0; i < str.size(); i ++ )
    {
        mp[str[i]] ++;
    }
    for (auto& [x,y]: mp) {
        cout << x << " " << y << endl;
    }

    for (int i = 0; i < str.size(); i ++ )
    {
        str[i] = 'A' + mp[str[i]];
    }
    decrypt(str, s);
    return 0;
}